﻿<frameTree version="0.94.51006.1"><frameException type="System.NullReferenceException"><tag exceptionState="unexpected"><generatedTestRef idref="7ed83f22-5632-48ea-81f0-4235bbd1e849"/>
</tag>
<frameNode><frame value="  at CAViewController.SetGridCell(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs(347)" method="CAViewController.SetGridCell(State[,])" offset="237" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs" line="347"><method assemblyName="AutomaTones" name="SetGridCell" token="60000fc"><declaringType assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
</method>
<beforeSource><![CDATA[            }
            if (IsPLaying || (_caReadyForReplay))
                _ca[_x, _y] = grid[_x, _y].CurrentState;]]></beforeSource>
<source><![CDATA[            View.SetCell(_x, _y, grid[_x, _y]);]]></source>
<afterSource><![CDATA[            NotifyLaunchpadOnCellClick(_x, _y, grid[_x, _y]);
        }
]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="7ed83f22-5632-48ea-81f0-4235bbd1e849"/>
<generatedTestRef idref="3b6c93c9-aff5-4af7-a01d-38fbb5b321e3"/>
</tag>
</frameNode>
<frameNode><frame value="  at CAViewController.Evolve() in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs(194)" method="CAViewController.Evolve()" offset="40" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs" line="194"><method assemblyName="AutomaTones" name="Evolve" token="60000f3"><declaringType assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[        [PexMethod]
        public void Evolve() {
            if (TimeStamp == _caHistory.Count) { //we're not 'back in time']]></beforeSource>
<source><![CDATA[                _caHistory.Add((CellularAutomaton)_ca.Clone());]]></source>
<afterSource><![CDATA[                _ca.Evolve();
            }
        }]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="f093ab7d-2924-4126-9d0f-03dabdfb95b2"/>
<generatedTestRef idref="a8ef4602-6f00-4a66-bdc6-5e573cb4aa21"/>
</tag>
</frameNode>
<frameNode><frame value="  at CAViewController.Pause() in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs(237)" method="CAViewController.Pause()" offset="158" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs" line="237"><method assemblyName="AutomaTones" name="Pause" token="60000f5"><declaringType assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[                View.SystemMessage("CA has been reset");
            }
            IsPaused = true;]]></beforeSource>
<source><![CDATA[            View.SystemMessage("Pause");]]></source>
<afterSource><![CDATA[        }

        //Go forward in time!]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="fa89b2df-9957-43ae-8a41-81865af7183b"/>
</tag>
</frameNode>
<frameNode><frame value="  at CAViewController.Save(String) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs(272)" method="CAViewController.Save(String)" offset="29" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs" line="272"><method assemblyName="AutomaTones" name="Save" token="60000f8"><declaringType assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
</type>
</parameter>
<parameter name="name" position="1"><type spec="Class"><definition assemblyName="mscorlib" name="String" token="2000049" namespace="System"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[        public void Save(String name) {
            Contract.Requires(name != null);
            if (_ca == null) {]]></beforeSource>
<source><![CDATA[                View.SystemMessage("No CA to save.");]]></source>
<afterSource><![CDATA[                return;
            }
            CaSaveContainer cas = new CaSaveContainer() {]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="b2ba3d63-537e-4f46-8ab8-a6d642f8c11c"/>
</tag>
</frameNode>
<frameNode><frame value="  at CAViewController.SetGridCell(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs(343)" method="CAViewController.SetGridCell(State[,])" offset="67" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs" line="343"><method assemblyName="AutomaTones" name="SetGridCell" token="60000fc"><declaringType assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
</method>
<beforeSource><![CDATA[            if (_stateBeingChanged) {
                grid[_x, _y].CurrentState = _state.CurrentState;
            } else {]]></beforeSource>
<source><![CDATA[                grid[_x, _y].CurrentState = ++grid[_x, _y].CurrentState % NUMBER_OF_STATES;]]></source>
<afterSource><![CDATA[            }
            if (IsPLaying || (_caReadyForReplay))
                _ca[_x, _y] = grid[_x, _y].CurrentState;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="97cd5d63-5389-47fa-8f5b-39b5e106a528"/>
<generatedTestRef idref="ab89adde-51fd-4b8a-bb57-ad5705390670"/>
</tag>
</frameNode>
<frameNode><frame value="  at CAViewController.SetUp() in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs(570)" method="CAViewController.SetUp()" offset="8" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs" line="570"><method assemblyName="AutomaTones" name="SetUp" token="6000110"><declaringType assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[        /// this controller. It assigns methods to delegates and eventhandlers. 
        /// </summary>
        public void SetUp() {]]></beforeSource>
<source><![CDATA[            View.OnCellClickEvent += CellClicked;]]></source>
<afterSource><![CDATA[            View.OnPlayButtonClickEvent += PlaySentFromUser;
            View.OnPauseButtonClickEvent += Pause;
            View.OnVolumeChangeEvent += SetVolume;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="319580ca-38fe-442e-9419-d4c8857cf44f"/>
</tag>
</frameNode>
<frameNode><frame value="  at MasterViewController.SetUp() in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\MainController.cs(179)" method="MasterViewController.SetUp()" offset="8" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\MainController.cs" line="179"><method assemblyName="AutomaTones" name="SetUp" token="600019b"><declaringType assemblyName="AutomaTones" name="MasterViewController" token="2000029"><declaringType assemblyName="AutomaTones" name="MainController" token="2000028" namespace="AutomaTones.Controller"/>
</declaringType>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="MasterViewController" token="2000029"><declaringType assemblyName="AutomaTones" name="MainController" token="2000028" namespace="AutomaTones.Controller"/>
</definition>
</type>
</parameter>
</method>
<beforeSource><![CDATA[           }
           [PexMethod]
           public void SetUp() {]]></beforeSource>
<source><![CDATA[               _view.OnForwardButtonClickEvent += Forward;]]></source>
<afterSource><![CDATA[               _view.OnPauseButtonClickEvent += Pause;
               _view.OnPlayButtonClickEvent += Play;
               _view.OnRewindButtonClickEvent += Rewind;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="35bec659-65c2-48dd-990a-a2b03cb26882"/>
</tag>
</frameNode>
<frameNode><frame value="  at ComputeLaunchpad.EvaluateNoteOnMessage(NoteOnMessage) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\HW Sense Compute\ComputeLaunchpad.cs(61)" method="ComputeLaunchpad.EvaluateNoteOnMessage(NoteOnMessage)" offset="2" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\HW Sense Compute\ComputeLaunchpad.cs" line="61"><method assemblyName="AutomaTones" name="EvaluateNoteOnMessage" token="6000155"><declaringType assemblyName="AutomaTones" name="ComputeLaunchpad" token="2000021" namespace="AutomaTones.HW_Sense_Compute"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="ComputeLaunchpad" token="2000021" namespace="AutomaTones.HW_Sense_Compute"/>
</type>
</parameter>
<parameter name="noteMsg" position="1"><type spec="Class"><definition assemblyName="Midi" name="NoteOnMessage" token="2000008" namespace="Midi"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[        /// </summary>
        private void EvaluateNoteOnMessage(NoteOnMessage noteMsg)
        {]]></beforeSource>
<source><![CDATA[            switch (noteMsg.Velocity)]]></source>
<afterSource><![CDATA[            {
                // Pad is pushed down on the Launchpad
                case 127:]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="24dd1ffe-60c5-42b6-a0d4-f3315b560598"/>
</tag>
</frameNode>
<frameNode><frame value="  at ComputeLaunchpad.ControlButton(ControlChangeMessage) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\HW Sense Compute\ComputeLaunchpad.cs(87)" method="ComputeLaunchpad.ControlButton(ControlChangeMessage)" offset="30" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\HW Sense Compute\ComputeLaunchpad.cs" line="87"><method assemblyName="AutomaTones" name="ControlButton" token="6000156"><declaringType assemblyName="AutomaTones" name="ComputeLaunchpad" token="2000021" namespace="AutomaTones.HW_Sense_Compute"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="ComputeLaunchpad" token="2000021" namespace="AutomaTones.HW_Sense_Compute"/>
</type>
</parameter>
<parameter name="cMsg" position="1"><type spec="Class"><definition assemblyName="Midi" name="ControlChangeMessage" token="200000c" namespace="Midi"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[        public void ControlButton(ControlChangeMessage cMsg) {
            _controlButtonPressed = !_controlButtonPressed;
            if (_controlButtonPressed)]]></beforeSource>
<source><![CDATA[                switch ((int)cMsg.Control) {]]></source>
<afterSource><![CDATA[                    case 104:
                        OkButtonEvent();
                        break;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="1744f6c4-fa04-4334-a510-f1c116753467"/>
</tag>
</frameNode>
<frameNode><frame value="  at GameOfLife.AddGofPattern(CellularAutomaton, GofPattern, Int32, Int32) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\RuleLib\GameOfLife.cs(128)" method="GameOfLife.AddGofPattern(CellularAutomaton, GofPattern, Int32, Int32)" offset="81" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\RuleLib\GameOfLife.cs" line="128"><method assemblyName="AutomaTones" name="AddGofPattern" static="true" token="6000098"><declaringType assemblyName="AutomaTones" name="GameOfLife" token="2000009" namespace="AutomaTones.Model.Automaton_Model.RuleLib"/>
<parameter name="gofAutomaton" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="gofPattern" position="1"><type spec="ValueType"><definition assemblyName="AutomaTones" valueType="true" name="GofPattern" token="200000a"><declaringType assemblyName="AutomaTones" name="GameOfLife" token="2000009" namespace="AutomaTones.Model.Automaton_Model.RuleLib"/>
</definition>
</type>
</parameter>
<parameter name="xPos" position="2"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
<parameter name="yPos" position="3"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[
            for (int y = 0; y < ySize; y++) {
                for (int x = 0; x < xSize; x++) {]]></beforeSource>
<source><![CDATA[                    gofAutomaton[x - deltaX + xPos, y - deltaY + yPos] = pattern[2 + x + y * xSize];]]></source>
<afterSource><![CDATA[                }
            }
        }]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="cacbd13d-e1f7-4062-9829-66a3b0317d9d"/>
</tag>
</frameNode>
<frameNode><frame value="  at BechTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\BechTranslator.cs(22)" method="BechTranslator.Translate(State[,])" offset="300" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\BechTranslator.cs" line="22"><method assemblyName="AutomaTones" name="Translate" token="6000115"><declaringType assemblyName="AutomaTones" name="BechTranslator" token="2000019" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="BechTranslator" token="2000019" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[        public List<NoteOut> Translate(State[,] grid) {
            Random random = new Random();
            _notes.Clear();]]></beforeSource>
<source><![CDATA[            for (int x = 0; x < grid.GetLength(0);x++)]]></source>
<afterSource><![CDATA[                for (int y = 0; y < grid.GetLength(1); y++)
                    if (grid[x, y].CurrentState > 0) {
                        if (grid[x, y].CurrentState == 1) {]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="1f11ad01-0ba3-4e5a-a44a-3271e3138b61"/>
</tag>
</frameNode>
<frameNode><frame value="  at BechTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\BechTranslator.cs(24)" method="BechTranslator.Translate(State[,])" offset="41" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\BechTranslator.cs" line="24"><method assemblyName="AutomaTones" name="Translate" token="6000115"><declaringType assemblyName="AutomaTones" name="BechTranslator" token="2000019" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="BechTranslator" token="2000019" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[            _notes.Clear();
            for (int x = 0; x < grid.GetLength(0);x++)
                for (int y = 0; y < grid.GetLength(1); y++)]]></beforeSource>
<source><![CDATA[                    if (grid[x, y].CurrentState > 0) {]]></source>
<afterSource><![CDATA[                        if (grid[x, y].CurrentState == 1) {
                            _notes.Add(new NoteOut(Pitch.G0, random.Next(128), 50, random.Next(20)));
                            break;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="a21e2836-c965-4611-986a-756aba5eabf1"/>
</tag>
</frameNode>
<frameNode><frame value="  at HqstTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs(18)" method="HqstTranslator.Translate(State[,])" offset="15" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs" line="18"><method assemblyName="AutomaTones" name="Translate" token="6000161"><declaringType assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[        public List<NoteOut> Translate(State[,] grid)
        {
            _notes.Clear();]]></beforeSource>
<source><![CDATA[            if (grid.GetLength(0) < 3 || grid.GetLength(1) < 3)]]></source>
<afterSource><![CDATA[                return _notes;
            for (int i = 0; i < 3; i++)
            {]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="3d24851a-cfb4-4053-a1c4-e3b5d525f3fe"/>
</tag>
</frameNode>
<frameNode><frame value="  at HqstTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs(23)" method="HqstTranslator.Translate(State[,])" offset="79" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs" line="23"><method assemblyName="AutomaTones" name="Translate" token="6000161"><declaringType assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++) {]]></beforeSource>
<source><![CDATA[                    if (grid[i, j].CurrentState == 0)]]></source>
<afterSource><![CDATA[                        continue;
                    switch (grid[i, j].CurrentState) {
                        case 1:]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="a284f8e4-0243-42fd-af05-a26e7bf2bc68"/>
</tag>
</frameNode>
<frameNode><frame value="  at HqstTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs(74)" method="HqstTranslator.Translate(State[,])" offset="612" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs" line="74"><method assemblyName="AutomaTones" name="Translate" token="6000161"><declaringType assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[
            for (int i = grid.GetLength(0)-3; i < grid.GetLength(0); i++) {
                for (int j = grid.GetLength(1) - 3; j < grid.GetLength(1); j++) {]]></beforeSource>
<source><![CDATA[                    if (grid[i, j].CurrentState == 0)]]></source>
<afterSource><![CDATA[                        continue;
                    switch (grid[i, j].CurrentState) {
                        case 1: {]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="7d071a12-82c7-45ba-bde0-3b56d65c4af8"/>
<generatedTestRef idref="2a7363ab-a911-41cd-a8f7-64afa61d6c5c"/>
</tag>
</frameNode>
<frameNode><frame value="  at MozartTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\MozartTranslator.cs(28)" method="MozartTranslator.Translate(State[,])" offset="486" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\MozartTranslator.cs" line="28"><method assemblyName="AutomaTones" name="Translate" token="60001e6"><declaringType assemblyName="AutomaTones" name="MozartTranslator" token="200002f" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="MozartTranslator" token="200002f" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[            else {
                noteTranslator *= -1;
            }]]></beforeSource>
<source><![CDATA[            for (int x = 0; x < grid.GetLength(0);x++)]]></source>
<afterSource><![CDATA[                for (int y = 0; y < grid.GetLength(1); y++)
                    if (grid[x, y].CurrentState > 0) {
                        if (grid[x, y].CurrentState == 1) {]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="fb45b35b-419a-4544-9c41-4876ba677eb8"/>
</tag>
</frameNode>
<frameNode><frame value="  at MozartTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\MozartTranslator.cs(30)" method="MozartTranslator.Translate(State[,])" offset="90" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\MozartTranslator.cs" line="30"><method assemblyName="AutomaTones" name="Translate" token="60001e6"><declaringType assemblyName="AutomaTones" name="MozartTranslator" token="200002f" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="MozartTranslator" token="200002f" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[            }
            for (int x = 0; x < grid.GetLength(0);x++)
                for (int y = 0; y < grid.GetLength(1); y++)]]></beforeSource>
<source><![CDATA[                    if (grid[x, y].CurrentState > 0) {]]></source>
<afterSource><![CDATA[                        if (grid[x, y].CurrentState == 1) {
                            _notes.Add(new NoteOut(Pitch.C1+noteTranslator, random.Next(128)));
                            break;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="e1315385-7a84-4b42-b96f-2dc462307844"/>
</tag>
</frameNode>
<frameNode><frame value="  at Convertor.CAToStateGrid(CellularAutomaton) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Tools\Convertor.cs(20)" method="Convertor.CAToStateGrid(CellularAutomaton)" offset="2" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Tools\Convertor.cs" line="20"><method assemblyName="AutomaTones" name="CAToStateGrid" static="true" token="60001c8"><declaringType assemblyName="AutomaTones" name="Convertor" token="200002c" namespace="AutomaTones.Model.Tools"/>
<parameter name="ca" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<resultType spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</resultType>
</method>
<beforeSource><![CDATA[        [PexMethod]
        public static State[,] CAToStateGrid(CellularAutomaton ca) {
            Contract.Requires(ca!=null);]]></beforeSource>
<source><![CDATA[            uint size = ca.DimensionSize;]]></source>
<afterSource><![CDATA[            State[,] stateGrid = new State[size,size];
            for (int x = 0; x < size; x++)
                for (int y = 0; y < size; y++)]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="1ebc52d6-3a02-49d0-9db3-c30966ca8094"/>
</tag>
</frameNode>
</frameException>
<frameException type="System.IndexOutOfRangeException"><tag exceptionState="unexpected"><generatedTestRef idref="cc339491-af34-41cd-9639-8cab4193afe6"/>
</tag>
<frameNode><frame value="  at CAViewController.SetGridCell(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs(343)" method="CAViewController.SetGridCell(State[,])" offset="67" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Controller\CAViewController.cs" line="343"><method assemblyName="AutomaTones" name="SetGridCell" token="60000fc"><declaringType assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CAViewController" token="2000016" namespace="AutomaTones.Controller"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
</method>
<beforeSource><![CDATA[            if (_stateBeingChanged) {
                grid[_x, _y].CurrentState = _state.CurrentState;
            } else {]]></beforeSource>
<source><![CDATA[                grid[_x, _y].CurrentState = ++grid[_x, _y].CurrentState % NUMBER_OF_STATES;]]></source>
<afterSource><![CDATA[            }
            if (IsPLaying || (_caReadyForReplay))
                _ca[_x, _y] = grid[_x, _y].CurrentState;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="cc339491-af34-41cd-9639-8cab4193afe6"/>
<generatedTestRef idref="51e50c30-b59a-4e6e-b44b-b4c3dc4234e2"/>
</tag>
</frameNode>
<frameNode><frame value="  at GameOfLife.AddGofPattern(CellularAutomaton, GofPattern, Int32, Int32) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\RuleLib\GameOfLife.cs(122)" method="GameOfLife.AddGofPattern(CellularAutomaton, GofPattern, Int32, Int32)" offset="7" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\RuleLib\GameOfLife.cs" line="122"><method assemblyName="AutomaTones" name="AddGofPattern" static="true" token="6000098"><declaringType assemblyName="AutomaTones" name="GameOfLife" token="2000009" namespace="AutomaTones.Model.Automaton_Model.RuleLib"/>
<parameter name="gofAutomaton" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="gofPattern" position="1"><type spec="ValueType"><definition assemblyName="AutomaTones" valueType="true" name="GofPattern" token="200000a"><declaringType assemblyName="AutomaTones" name="GameOfLife" token="2000009" namespace="AutomaTones.Model.Automaton_Model.RuleLib"/>
</definition>
</type>
</parameter>
<parameter name="xPos" position="2"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
<parameter name="yPos" position="3"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[                                         int yPos = 0) {
            Contract.Requires(null != gofAutomaton);
            Contract.Requires(2 == gofAutomaton.Dimensions);]]></beforeSource>
<source><![CDATA[            int[] pattern = Patterns[(int) gofPattern];]]></source>
<afterSource><![CDATA[            int xSize = pattern[0], ySize = pattern[1];
            int deltaX = xSize / 2, deltaY = ySize / 2;
]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="13f4b595-a91b-40bd-967f-482f933b3050"/>
</tag>
</frameNode>
<frameNode><frame value="  at CellularAutomaton.GetIndex(Int32[]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs(102)" method="CellularAutomaton.GetIndex(Int32[])" offset="36" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs" line="102"><method assemblyName="AutomaTones" name="GetIndex" token="600013d"><declaringType assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="coord" position="1"><type spec="SzArray"><elementType spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</elementType>
</type>
</parameter>
<resultType spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="UInt32" token="200016a" namespace="System"/>
</resultType>
</method>
<beforeSource><![CDATA[                // Loop invariant
                Contract.Assert(0 <= index && Grid.Length > index);
                // Make sure coordinates which exceed the bounds of any dimension are 'wrapped around']]></beforeSource>
<source><![CDATA[                int c = coord[i - 1] % (int)DimensionSize;]]></source>
<afterSource><![CDATA[                c = 0 <= c ? c : c + (int)DimensionSize;
                // Sum the the effect of each coordinate to find the correct position in the grid array
                index += c * (int)Math.Pow(DimensionSize, Dimensions - i);]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="988a72b9-614e-4894-af50-6b04f41ef368"/>
<generatedTestRef idref="7bedc6df-b2fc-43aa-9896-f8bed0dbf005"/>
</tag>
<frameNode><frame value="  at CellularAutomaton.set_Item(Int32[], Int32) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs(212)" method="CellularAutomaton.set_Item(Int32[], Int32)" offset="9" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs" line="212"><method assemblyName="AutomaTones" name="set_Item" token="6000146"><declaringType assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="coord" position="1"><type spec="SzArray"><elementType spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</elementType>
</type>
</parameter>
<parameter name="value" position="2"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[            set {
                Contract.Requires(coord.Length == Dimensions);
                Contract.Ensures(GetCell(coord).State.CurrentState.Equals(value));]]></beforeSource>
<source><![CDATA[                Grid[GetIndex(coord)].State.CurrentState = value;]]></source>
<afterSource><![CDATA[            }
        }
]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="988a72b9-614e-4894-af50-6b04f41ef368"/>
</tag>
</frameNode>
<frameNode><frame value="  at CellularAutomaton.GetCell(Int32[]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs(82)" method="CellularAutomaton.GetCell(Int32[])" offset="3" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs" line="82"><method assemblyName="AutomaTones" name="GetCell" token="600013c"><declaringType assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="coord" position="1"><type spec="SzArray"><elementType spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="AutomaTones" name="Cell" token="2000002" namespace="AutomaTones.Model.Automaton_Model"/>
</resultType>
</method>
<beforeSource><![CDATA[            Contract.Requires(null != coord);
            Contract.Requires(coord.Length == Dimensions);
            Contract.Ensures(Contract.Result<Cell>() != null);]]></beforeSource>
<source><![CDATA[            uint index = GetIndex(coord);]]></source>
<afterSource><![CDATA[            return Grid[index];
        }
]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="7bedc6df-b2fc-43aa-9896-f8bed0dbf005"/>
</tag>
</frameNode>
</frameNode>
<frameNode><frame value="  at BechTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\BechTranslator.cs(24)" method="BechTranslator.Translate(State[,])" offset="36" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\BechTranslator.cs" line="24"><method assemblyName="AutomaTones" name="Translate" token="6000115"><declaringType assemblyName="AutomaTones" name="BechTranslator" token="2000019" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="BechTranslator" token="2000019" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[            _notes.Clear();
            for (int x = 0; x < grid.GetLength(0);x++)
                for (int y = 0; y < grid.GetLength(1); y++)]]></beforeSource>
<source><![CDATA[                    if (grid[x, y].CurrentState > 0) {]]></source>
<afterSource><![CDATA[                        if (grid[x, y].CurrentState == 1) {
                            _notes.Add(new NoteOut(Pitch.G0, random.Next(128), 50, random.Next(20)));
                            break;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="6c71b06c-d70c-4e6f-831b-f3817542795f"/>
<generatedTestRef idref="eb4229ea-12dd-4fcc-9d33-ca7360fe6919"/>
<generatedTestRef idref="6e8a5b78-1125-4ffc-a9c6-0d7f5ef73f04"/>
</tag>
</frameNode>
<frameNode><frame value="  at HqstTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs(23)" method="HqstTranslator.Translate(State[,])" offset="74" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs" line="23"><method assemblyName="AutomaTones" name="Translate" token="6000161"><declaringType assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++) {]]></beforeSource>
<source><![CDATA[                    if (grid[i, j].CurrentState == 0)]]></source>
<afterSource><![CDATA[                        continue;
                    switch (grid[i, j].CurrentState) {
                        case 1:]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="8da92fee-d801-4da0-81ae-354745eca939"/>
<generatedTestRef idref="e2ba3b0c-c588-46f7-9719-bd7e221fb7a3"/>
<generatedTestRef idref="3b97340c-9024-46b1-a9c5-b41c225ea7fd"/>
<generatedTestRef idref="81c133f2-7dad-4d51-b011-f416c431c464"/>
<generatedTestRef idref="e777d80b-a68a-4b66-9482-ff5518e0d566"/>
<generatedTestRef idref="d18466d2-26b7-47eb-9ed5-adac249a794d"/>
<generatedTestRef idref="efcb9e5f-d7a6-4194-b1c3-81caf898eece"/>
<generatedTestRef idref="1b4e9dad-cca5-4730-83a1-64fac90a9d02"/>
<generatedTestRef idref="6461eccd-17c9-4374-91db-cfae696cc780"/>
<generatedTestRef idref="da33792c-3f2a-4f9a-b275-191114a61cd9"/>
<generatedTestRef idref="863f8ad4-8201-4caa-adc3-f76249d3e7c8"/>
<generatedTestRef idref="0eb33f85-0ded-4564-8d26-ab8c6761cd03"/>
</tag>
</frameNode>
<frameNode><frame value="  at HqstTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs(74)" method="HqstTranslator.Translate(State[,])" offset="607" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs" line="74"><method assemblyName="AutomaTones" name="Translate" token="6000161"><declaringType assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="HqstTranslator" token="2000024" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[
            for (int i = grid.GetLength(0)-3; i < grid.GetLength(0); i++) {
                for (int j = grid.GetLength(1) - 3; j < grid.GetLength(1); j++) {]]></beforeSource>
<source><![CDATA[                    if (grid[i, j].CurrentState == 0)]]></source>
<afterSource><![CDATA[                        continue;
                    switch (grid[i, j].CurrentState) {
                        case 1: {]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="33b31f8b-e447-49f7-9662-11545b3cec77"/>
<generatedTestRef idref="b9181e88-bdf0-4fcc-9d9b-80cff0c3162b"/>
<generatedTestRef idref="a7e2051f-94fd-4eda-a3df-767d670a035d"/>
<generatedTestRef idref="ca5b4718-cde6-4fda-bddf-d161c885119a"/>
<generatedTestRef idref="368924db-bf42-446b-8be1-47594c7fbdc1"/>
</tag>
</frameNode>
<frameNode><frame value="  at MozartTranslator.Translate(State[,]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\MozartTranslator.cs(30)" method="MozartTranslator.Translate(State[,])" offset="85" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\MozartTranslator.cs" line="30"><method assemblyName="AutomaTones" name="Translate" token="60001e6"><declaringType assemblyName="AutomaTones" name="MozartTranslator" token="200002f" namespace="AutomaTones.Model.MIDI.Mappers"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="MozartTranslator" token="200002f" namespace="AutomaTones.Model.MIDI.Mappers"/>
</type>
</parameter>
<parameter name="grid" position="1"><type spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</type>
</parameter>
<resultType spec="Class"><definition assemblyName="mscorlib" name="List`1" token="200033e" namespace="System.Collections.Generic"><genericParameter value="T"/>
</definition>
<genericTypeArgument spec="Class"><definition assemblyName="AutomaTones" name="NoteOut" token="2000023" namespace="AutomaTones.Model.MIDI"/>
</genericTypeArgument>
</resultType>
</method>
<beforeSource><![CDATA[            }
            for (int x = 0; x < grid.GetLength(0);x++)
                for (int y = 0; y < grid.GetLength(1); y++)]]></beforeSource>
<source><![CDATA[                    if (grid[x, y].CurrentState > 0) {]]></source>
<afterSource><![CDATA[                        if (grid[x, y].CurrentState == 1) {
                            _notes.Add(new NoteOut(Pitch.C1+noteTranslator, random.Next(128)));
                            break;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="da5f4af1-2ddd-4da5-a77e-9d32872381c8"/>
<generatedTestRef idref="ed2b1332-b58b-4c92-9d26-f9c01c32001a"/>
<generatedTestRef idref="80b7c003-6780-4209-b515-ecc6087c7325"/>
<generatedTestRef idref="f5390605-4311-437f-b312-0e979a616f61"/>
<generatedTestRef idref="65e5fd13-c50c-4f9a-a70f-c73f0f9dfc02"/>
</tag>
</frameNode>
</frameException>
<frameException type="System.ArgumentException"><tag exceptionState="unexpected"><generatedTestRef idref="4c777fa1-dcd1-4378-ad8d-d495c52a179f"/>
</tag>
<frameNode><frame value="  at ConnectLaunchpad.GetInDeviceNumber() in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\HW Sense Compute\ConnectLaunchpad.cs(56)" method="ConnectLaunchpad.GetInDeviceNumber()" offset="33" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\HW Sense Compute\ConnectLaunchpad.cs" line="56"><method assemblyName="AutomaTones" name="GetInDeviceNumber" token="6000214"><declaringType assemblyName="AutomaTones" name="ConnectLaunchpad" token="2000036" namespace="AutomaTones.HW_Sense_Compute"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="ConnectLaunchpad" token="2000036" namespace="AutomaTones.HW_Sense_Compute"/>
</type>
</parameter>
<resultType spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</resultType>
</method>
<beforeSource><![CDATA[        private int GetInDeviceNumber() {
            SetInDeviceNumber();
            if (_inDevice == null)]]></beforeSource>
<source><![CDATA[                throw new ArgumentException(Error);]]></source>
<afterSource><![CDATA[            return (int)_inDevice;
        }
]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="4c777fa1-dcd1-4378-ad8d-d495c52a179f"/>
</tag>
<frameNode><frame value="  at ConnectLaunchpad..ctor() in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\HW Sense Compute\ConnectLaunchpad.cs(21)" method="ConnectLaunchpad..ctor()" offset="14" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\HW Sense Compute\ConnectLaunchpad.cs" line="21"><method assemblyName="AutomaTones" name=".ctor" token="6000211"><declaringType assemblyName="AutomaTones" name="ConnectLaunchpad" token="2000036" namespace="AutomaTones.HW_Sense_Compute"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="ConnectLaunchpad" token="2000036" namespace="AutomaTones.HW_Sense_Compute"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[        
        public ConnectLaunchpad() {
            Contract.Requires(!this.Connected());]]></beforeSource>
<source><![CDATA[            In = InputDevice.InstalledDevices[GetInDeviceNumber()];]]></source>
<afterSource><![CDATA[            Out = OutputDevice.InstalledDevices[GetOutDeviceNumber()];
        }
]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="4c777fa1-dcd1-4378-ad8d-d495c52a179f"/>
</tag>
</frameNode>
</frameNode>
</frameException>
<frameException type="Microsoft.Pex.Framework.Exceptions.TraceAssertionException"><tag exceptionState="unexpected"><generatedTestRef idref="ee33bb4a-0c33-4080-9e38-e79feb4edc52"/>
</tag>
<frameNode><frame value="  at TraceInternal.Fail(String, String)" method="TraceInternal.Fail(String, String)" offset="54"><method assemblyName="System" name="Fail" static="true" token="6004168"><declaringType assemblyName="System" name="TraceInternal" token="200056f" namespace="System.Diagnostics"/>
<parameter position="0"><type spec="Class"><definition assemblyName="mscorlib" name="String" token="2000049" namespace="System"/>
</type>
</parameter>
<parameter position="1"><type spec="Class"><definition assemblyName="mscorlib" name="String" token="2000049" namespace="System"/>
</type>
</parameter>
</method>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="ee33bb4a-0c33-4080-9e38-e79feb4edc52"/>
</tag>
<frameNode><frame value="  at Debug.Fail(String, String)" method="Debug.Fail(String, String)" offset="2"><method assemblyName="System" name="Fail" static="true" token="6000b4a"><declaringType assemblyName="System" name="Debug" token="200017b" namespace="System.Diagnostics"/>
<parameter name="message" position="0"><type spec="Class"><definition assemblyName="mscorlib" name="String" token="2000049" namespace="System"/>
</type>
</parameter>
<parameter name="detailMessage" position="1"><type spec="Class"><definition assemblyName="mscorlib" name="String" token="2000049" namespace="System"/>
</type>
</parameter>
</method>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="ee33bb4a-0c33-4080-9e38-e79feb4edc52"/>
</tag>
<frameNode><frame value="  at Assert.Check(Boolean, String, String)" method="Assert.Check(Boolean, String, String)" offset="5"><method assemblyName="mscorlib" name="Check" static="true" token="60021c6"><declaringType assemblyName="mscorlib" name="Assert" token="200036d" namespace="System.Diagnostics"/>
<parameter name="condition" position="0"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Boolean" token="2000096" namespace="System"/>
</type>
</parameter>
<parameter name="conditionString" position="1"><type spec="Class"><definition assemblyName="mscorlib" name="String" token="2000049" namespace="System"/>
</type>
</parameter>
<parameter name="message" position="2"><type spec="Class"><definition assemblyName="mscorlib" name="String" token="2000049" namespace="System"/>
</type>
</parameter>
</method>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="ee33bb4a-0c33-4080-9e38-e79feb4edc52"/>
</tag>
<frameNode><frame value="  at Contract.Assert(Boolean)" method="Contract.Assert(Boolean)" offset="7"><method assemblyName="mscorlib" name="Assert" static="true" token="6002300"><declaringType assemblyName="mscorlib" name="Contract" token="20003a3" namespace="System.Diagnostics.Contracts"/>
<parameter name="condition" position="0"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Boolean" token="2000096" namespace="System"/>
</type>
</parameter>
</method>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="ee33bb4a-0c33-4080-9e38-e79feb4edc52"/>
</tag>
<frameNode><frame value="  at CellularAutomaton.GetIndex(Int32[]) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs(100)" method="CellularAutomaton.GetIndex(Int32[])" offset="26" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs" line="100"><method assemblyName="AutomaTones" name="GetIndex" token="600013d"><declaringType assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="coord" position="1"><type spec="SzArray"><elementType spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</elementType>
</type>
</parameter>
<resultType spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="UInt32" token="200016a" namespace="System"/>
</resultType>
</method>
<beforeSource><![CDATA[            var index = 0;
            for (int i = 1; i <= Dimensions; i++) {
                // Loop invariant]]></beforeSource>
<source><![CDATA[                Contract.Assert(0 <= index && Grid.Length > index);]]></source>
<afterSource><![CDATA[                // Make sure coordinates which exceed the bounds of any dimension are 'wrapped around'
                int c = coord[i - 1] % (int)DimensionSize;
                c = 0 <= c ? c : c + (int)DimensionSize;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="ee33bb4a-0c33-4080-9e38-e79feb4edc52"/>
</tag>
<frameNode><frame value="  at CellularAutomaton.set_Item(Int32[], Int32) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs(212)" method="CellularAutomaton.set_Item(Int32[], Int32)" offset="9" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs" line="212"><method assemblyName="AutomaTones" name="set_Item" token="6000146"><declaringType assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="coord" position="1"><type spec="SzArray"><elementType spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</elementType>
</type>
</parameter>
<parameter name="value" position="2"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[            set {
                Contract.Requires(coord.Length == Dimensions);
                Contract.Ensures(GetCell(coord).State.CurrentState.Equals(value));]]></beforeSource>
<source><![CDATA[                Grid[GetIndex(coord)].State.CurrentState = value;]]></source>
<afterSource><![CDATA[            }
        }
]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="ee33bb4a-0c33-4080-9e38-e79feb4edc52"/>
</tag>
</frameNode>
</frameNode>
</frameNode>
</frameNode>
</frameNode>
</frameNode>
</frameException>
<frameException type="System.OverflowException"><tag exceptionState="expected"><generatedTestRef idref="7a80f31a-17d5-4742-a3fc-7f49b15cdd24"/>
</tag>
<frameNode><frame value="  at CellularAutomaton.Init(UInt32, UInt32, Rule, Int32, Int32, Int32) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs(66)" method="CellularAutomaton.Init(UInt32, UInt32, Rule, Int32, Int32, Int32)" offset="48" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs" line="66"><method assemblyName="AutomaTones" name="Init" token="600013b"><declaringType assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="dimensions" position="1"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="UInt32" token="200016a" namespace="System"/>
</type>
</parameter>
<parameter name="dimensionSize" position="2"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="UInt32" token="200016a" namespace="System"/>
</type>
</parameter>
<parameter name="defaultRule" position="3"><type spec="Class"><definition assemblyName="AutomaTones" name="Rule" token="200000b" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="stateMin" position="4"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
<parameter name="stateMax" position="5"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
<parameter name="stateInit" position="6"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[            Generation = 0;
            Dimensions = dimensions;
            DimensionSize = dimensionSize;]]></beforeSource>
<source><![CDATA[            Grid = new Cell[(int)Math.Pow(DimensionSize, Dimensions)];]]></source>
<afterSource><![CDATA[            for (int i = 0; i < Grid.Length; i++) {
                Grid[i] = new Cell(defaultRule, stateMin, stateMax, stateInit);
            }]]></afterSource>
</frame>
<tag exceptionState="expected"><generatedTestRef idref="7a80f31a-17d5-4742-a3fc-7f49b15cdd24"/>
</tag>
<frameNode><frame value="  at CellularAutomaton..ctor(UInt32, UInt32, Rule, Int32, Int32, Int32) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs(54)" method="CellularAutomaton..ctor(UInt32, UInt32, Rule, Int32, Int32, Int32)" offset="18" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\Cellular Automaton.cs" line="54"><method assemblyName="AutomaTones" name=".ctor" token="600013a"><declaringType assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
<parameter this="true" name="this" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="dimensions" position="1"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="UInt32" token="200016a" namespace="System"/>
</type>
</parameter>
<parameter name="dimensionSize" position="2"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="UInt32" token="200016a" namespace="System"/>
</type>
</parameter>
<parameter name="defaultRule" position="3"><type spec="Class"><definition assemblyName="AutomaTones" name="Rule" token="200000b" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<parameter name="stateMin" position="4"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
<parameter name="stateMax" position="5"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
<parameter name="stateInit" position="6"><type spec="ValueType"><definition assemblyName="mscorlib" valueType="true" name="Int32" token="20000ec" namespace="System"/>
</type>
</parameter>
</method>
<beforeSource><![CDATA[            Contract.Requires(dimensions == defaultRule.Dimensions);
            Contract.Requires(stateMin < stateMax);
            Contract.Requires(stateMin <= stateInit && stateMax >= stateInit);]]></beforeSource>
<source><![CDATA[            Init(dimensions, dimensionSize, defaultRule, stateMin, stateMax, stateInit);]]></source>
<afterSource><![CDATA[        }

        private void Init(uint dimensions, uint dimensionSize, Rule defaultRule,]]></afterSource>
</frame>
<tag exceptionState="expected"><generatedTestRef idref="7a80f31a-17d5-4742-a3fc-7f49b15cdd24"/>
</tag>
</frameNode>
</frameNode>
<frameNode><frame value="  at Convertor.CAToStateGrid(CellularAutomaton) in C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Tools\Convertor.cs(21)" method="Convertor.CAToStateGrid(CellularAutomaton)" offset="12" file="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Tools\Convertor.cs" line="21"><method assemblyName="AutomaTones" name="CAToStateGrid" static="true" token="60001c8"><declaringType assemblyName="AutomaTones" name="Convertor" token="200002c" namespace="AutomaTones.Model.Tools"/>
<parameter name="ca" position="0"><type spec="Class"><definition assemblyName="AutomaTones" name="CellularAutomaton" token="200001e" namespace="AutomaTones.Model.Automaton_Model"/>
</type>
</parameter>
<resultType spec="MdArray" rank="2"><elementType spec="Class"><definition assemblyName="AutomaTones" name="State" token="200002d" namespace="AutomaTones.Model.Automaton_Model"/>
</elementType>
</resultType>
</method>
<beforeSource><![CDATA[        public static State[,] CAToStateGrid(CellularAutomaton ca) {
            Contract.Requires(ca!=null);
            uint size = ca.DimensionSize;]]></beforeSource>
<source><![CDATA[            State[,] stateGrid = new State[size,size];]]></source>
<afterSource><![CDATA[            for (int x = 0; x < size; x++)
                for (int y = 0; y < size; y++)
                    stateGrid[x, y] = ca.GetCell(x,y).State;]]></afterSource>
</frame>
<tag exceptionState="unexpected"><generatedTestRef idref="f741d7c9-6c03-47fe-a7ce-f2f23ea35a53"/>
</tag>
</frameNode>
</frameException>
</frameTree>
